#include <cstdio>
#include <queue>
#include <vector>

using namespace std;

const int Limit_Size = 1000 + 10;
const int Max_Int = 0xfffffff;

int d[ Limit_Size ], map[ Limit_Size ][ Limit_Size ], like[ Limit_Size ];
vector<int> c[ Limit_Size ];
int T, S, D;

void init( )
{
    int i, j, a, b, cost;
    for ( i = 0; i <= 1000; i++ )
    {
        for ( j = 0; j <= 1000; j++ )
            map[ i ][ j ] = Max_Int;
        c[ i ].clear( );
    }
    for ( i = 0; i < T; i++ )
    {
        scanf("%d%d%d", &a, &b, &cost);
        if ( map[ a ][ b ] == Max_Int )
        {
            c[ a ].push_back( b );
            c[ b ].push_back( a );
            map[ a ][ b ] = map[ b ][ a ] = cost;
        }
        else
            if ( cost < map[ a ][ b ] )
                map[ a ][ b ] = map[ b ][ a ] = cost;
    }
    for ( i = 0; i < S; i++ )
    {
        scanf("%d", &b);
        map[ 0 ][ b ] = map[ b ][ 0 ] = 0;
        c[ 0 ].push_back( b );
        c[ b ].push_back( 0 );
    }
    for ( i = 0; i < D; i++ )
        scanf("%d", &like[ i ]);
}

bool relax( int x, int y, int cost )
{
    if ( d[ y ] > d[ x ] + cost )
    {
        d[ y ] = d[ x ] + cost;
        return 1;
    }
    return 0;
}

void spfa( )
{
    int i, j, p;
    queue<int> q;
    vector<int>::iterator vi;
    for ( i = 1; i <= 1000; i++ )
        d[ i ] = Max_Int;
    d[ 0 ] = 0;
    q.push( 0 );
    while ( !q.empty( ) )
    {
        p = q.front( );
        q.pop( );
        for ( vi = c[ p ].begin( ); vi != c[ p ].end( ); vi++ )
            if ( relax( p, *vi, map[ p ][ *vi ] ) )
                q.push( *vi );
    }
}

void print( )
{
    int i, minn = d[ like[ 0 ] ];
    for ( i = 1; i < D; i++ )
        if ( minn > d[ like[ i ] ] )
            minn = d[ like[ i ] ];
    printf("%d\n", minn);
}

int main( )
{
    while ( scanf("%d%d%d", &T, &S, &D) != EOF )
    {
        init( );
        spfa( );
        print( );
    }
    return 0;
}
